<script setup lang="ts">
import { onActivated, onMounted } from "vue";
import { start } from "qiankun";
import { qiankunInit } from "@/qiankun";

type MicroAppWindow = Window &
  typeof globalThis & {
    qiankunStarted: boolean;
  };

onMounted(() => {
  // 启动 qiankun
  if (!window.qiankunStarted) {
    console.log("准备start");
    window.qiankunStarted = true;
    start({
      prefetch: false, // 开启预加载
      sandbox: {
        experimentalStyleIsolation: true //   开启沙箱模式,实验性方案  样式隔离
      }
    });
    //start();
  }

  // start({
  //     prefetch: false, // 开启预加载
  //     sandbox: {
  //         experimentalStyleIsolation: true, //   开启沙箱模式,实验性方案
  //     }
  // });
});
</script>

<template>
  <div id="micro-app-container"></div>
</template>

<style lang="scss" scoped></style>
